package com.example.demo.mapper;

import com.example.demo.pojo.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;


@Mapper
public interface UserMapper {



    @Select("select username, type, password, id from sys_user where username = #{username}")
    User findByUsername(String username);

    @Select("select status from roles where name = #{name}")
    int findByName(String name);

}
